package com.rjxy.plansystemmanagement.service.impl;

import com.rjxy.plansystemmanagement.entity.ChargebacksInformation;
import com.rjxy.plansystemmanagement.mapper.ChargebacksMapper;
import com.rjxy.plansystemmanagement.service.ChargebacksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChargebacksServiceImpl implements ChargebacksService {
    @Autowired
    private ChargebacksMapper chargebacksMapper;

    /**
     * 查询所有退单信息
     * @return
     */
    @Override
    public List<ChargebacksInformation> list() {
        return chargebacksMapper.list();
    }

    /**
     * 根据id删除指定退单信息
     * @param id
     */
    @Override
    public void deleteChargeback(Integer id) {
        chargebacksMapper.deleteChargeback(id);
    }

    /**
     * 添加退单信息
     * @param chargebacksInformation
     */
    @Override
    public void addChargeback(ChargebacksInformation chargebacksInformation) {
        chargebacksMapper.addChargeback(chargebacksInformation);
    }

    @Override
    public ChargebacksInformation getChargebackById(Integer id) {
        return chargebacksMapper.getChargebackById(id);
    }


}
